package day7.zuoye;

import java.util.Scanner;

public class Test02 {
    public static void main(String[] args) {
        int a[]=new int[10];
        int max=a[0];
        for(int i=0;i<a.length;i++){
            a[i]=(int)(Math.random()*100);
        }
        for (int ar:a){
            System.out.print(ar+" ");
        }
        System.out.println();
        for(int i=0;i<a.length;i++){
           if (max<a[i]){
               max=a[i];

           }
        }
        System.out.println("最大数字是"+max);
        for (int index=0;index<a.length;index++){
            if (a[index]==max){
                System.out.println("位置是"+index);
            }
        }

    }
}
